a = int(input("Введите число"))
a1 = a // 1000
a2 = a % 1000 // 100
a3 = a % 100 // 10
a4 = a % 10
if a // 1000:
    b = 0
else:
    print("это число не 4-х значное")

if a % 2 == 0:
    print("Да")
elif a % 2 != 0:
    print("Нет")

if a % 3 == 0:
    print("Да")
elif a % 3 != 0:
    print("Нет")

import math
n = float(a)
b = int(math.sqrt(n))
if b * b == n:
    print(b)
else:
    print("Нет")

minimum, maximum = 9, 0

while a:
    a, n = divmod(a, 10)
    minimum = min(minimum, n)
    maximum = max(maximum, n)
print(maximum)
print(minimum)

import math
n = float(a4)
b = int(math.sqrt(n))
if b * b == n:
    print(b)
else:
    print("Нет")

import math
n = float(a3)
b = int(math.sqrt(n))
if b * b == n:
    print(b)
else:
    print("Нет")

import math
n = float(a2)
b = int(math.sqrt(n))
if b * b == n:
    print(b)
else:
    print("Нет")

import math
n = float(a1)
b = int(math.sqrt(n))
if b * b == n:
    print(b)
else:
    print("Нет")
